﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NesEmulatorX.UI
{
	public partial class frmDebug : Form
	{
		#region Properties

		public Disassembler Disassembler
		{
			get { return _disassembler; }
			private set { _disassembler = value; }
		}
		private Disassembler _disassembler = new Disassembler();

		public string CurrentCode
		{
			get { return _currentCode; }
			private set { _currentCode = value; }
		}
		private string _currentCode = String.Empty;

		#endregion

		#region Public Methods

		public frmDebug()
		{
			InitializeComponent();
		}

		public void LoadROM(NESROM rom)
		{
			if (rom == null)
				throw new ArgumentNullException("rom");

			this.CurrentCode = this.Disassembler.Disassemble(rom);

			this.rtbCode.Text = this.CurrentCode;
		}

		#endregion

		#region Private Methods

		private void frmDebug_Load(object sender, EventArgs e)
		{
		}

		#endregion
	}
}
